import request from '@/utils/request'


export function listprovince(query) {
  return request({
    url: '/shopping/ordermaster/province',
    method: 'get',
    params: query
  })
}


export function listcity(provinceCode) {
  return request({
    url: '/shopping/ordermaster/city/' + provinceCode,
    method: 'get',
  })
}


export function listtown(cityCode) {
  return request({
    url: '/shopping/ordermaster/town/'+ cityCode,
    method: 'get',
  })
}


// 查询文件信息列表  listInfo, getInfo, exportInfo
export function listInfo(query) {
  return request({
    url: '/shopping/ordermaster/list',
    method: 'get',
    params: query
  })
}

// 查询文件信息详细
export function getInfo(productId) {
  return request({
    url: '/shopping/ordermaster/getInfoPid/' + productId,
    method: 'get'
  })
}

export function exportInfo(query) {
  return request({
    url: '/shopping/ordermaster/export',
    method: 'get',
    params: query
  })
}


export function updateMaster(data) {
  return request({
    url: '/shopping/ordermaster',
    method: 'put',
    data: data
  })
}



// 以下是 商品分类的******************************************
export function listInfoPc(query) {
  return request({
    url: '/shopping/ordermaster/listpc',
    method: 'get',
    params: query
  })
}

// 查询文件信息详细
export function getInfoPc(categoryId) {
  return request({
    url: '/shopping/ordermaster/' + categoryId,
    method: 'get'
  })
}


// 查询文件信息详细
export function selectById(orderId) {
  return request({
    url: '/shopping/ordermaster/selectById/' + orderId,
    method: 'get'
  })
}


// 以下是 商品信息的**********************************************

export function listInfopi(query) {
  return request({
    url: '/shopping/ordermaster/listpi',
    method: 'get',
    params: query
  })
}

export function listInfopiTwo(query) {
  return request({
    url: '/shopping/ordermaster/listpiTwo',
    method: 'get',
    params: query
  })
}


export function getInfopi(categoryId) {
  return request({
    url: '/shopping/ordermaster/getInfopi/' + categoryId,
    method: 'get'
  })
}


// 以下是  订单的*****************************************************

export function listInfodd(query) {
  return request({
    url: '/shopping/ordermaster/listdd',
    method: 'get',
    params: query
  })
}


export function getInfodd(orderId) {
  return request({
    url: '/shopping/ordermaster/getInfodd/' + orderId,
    method: 'get'
  })
}

// export function updateFaHuo(data) {
//   return request({
//     url: '/shopping/ordermaster/updateFaHuo',
//     method: 'put',
//     data: data
//   })
// }

export function updateFaHuo(orderId) {
  return request({
    url: '/shopping/ordermaster/updateFaHuo/' + orderId,
    method: 'delete'
  })
}

export function listInfoYI(query) {
  return request({
    url: '/shopping/ordermaster/findAllListVoYI',
    method: 'get',
    params: query
  })
}

export function listInfoER(query) {
  return request({
    url: '/shopping/ordermaster/findAllListVoER',
    method: 'get',
    params: query
  })
}

export function listInfoSAN(query) {
  return request({
    url: '/shopping/ordermaster/findAllListVoSAN',
    method: 'get',
    params: query
  })
}

export function listInfoSI(query) {
  return request({
    url: '/shopping/ordermaster/findAllListVoSI',
    method: 'get',
    params: query
  })
}

export function listInfoWU(query) {
  return request({
    url: '/shopping/ordermaster/findAllListVoWU',
    method: 'get',
    params: query
  })
}
export function listInfoLIU(query) {
  return request({
    url: '/shopping/ordermaster/findAllListVoLIU',
    method: 'get',
    params: query
  })
}

export function listInfoQI(query) {
  return request({
    url: '/shopping/ordermaster/findAllListVoQI',
    method: 'get',
    params: query
  })
}


// 查看订单的支付凭证
export function selectOrderVoucher(orderId) {
  return request({
    url: '/shopping/ordermaster/selectOrderVoucher/'+orderId,
    method: 'get',
  })
}







